package com.aidex.storage.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.BaseEntity;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.storage.mapper.BusInStorageMapper;
import com.aidex.storage.domain.BusInStorage;
import com.aidex.storage.service.BusInStorageService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 入库信息Service业务层处理
 * @author cq
 * @email 382425530@qq.com
 * @date 2023-06-20
 */
@Service
@Transactional(readOnly = true)
public class BusInStorageServiceImpl extends BaseServiceImpl<BusInStorageMapper, BusInStorage> implements BusInStorageService {

    private static final Logger log = LoggerFactory.getLogger(BusInStorageServiceImpl.class);

    /**
     * 获取单条数据
     * @param busInStorage 入库信息
     * @return 入库信息
     */
    @Override
    public BusInStorage get(BusInStorage busInStorage) {
        BusInStorage dto = super.get(busInStorage);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 入库信息id
     * @return 入库信息
     */
    @Override
    public BusInStorage get(String id) {
        BusInStorage dto = super.get(id);
        return dto;
    }

    /**
     * 查询入库信息列表
     * @param busInStorage 入库信息
     * @return 入库信息
     */
    @Override
    public List<BusInStorage> findList(BusInStorage busInStorage) {
		List<BusInStorage> busInStorageList = super.findList(busInStorage);
        return busInStorageList;
    }

    /**
     * 分页查询入库信息列表
     * @param busInStorage 入库信息
     * @return 入库信息
     */
    @Override
    public PageInfo<BusInStorage> findPage(BusInStorage busInStorage) {
		PageInfo<BusInStorage> page = super.findPage(busInStorage);
        return page;
    }

    /**
     * 保存入库信息
     * @param busInStorage
     * @return 结果
     */
    @Override
    public boolean save(BusInStorage busInStorage) {
        return super.save(busInStorage);
    }

    /**
     * 删除入库信息信息
     * @param busInStorage
     * @return 结果
     */
    @Override
    public boolean remove(BusInStorage busInStorage) {
        return super.remove(busInStorage);
    }

    /**
     * 批量删除入库信息
     * @param ids 需要删除的入库信息ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBusInStorageByIds(String[] ids) {
        return mapper.deleteBusInStorageByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

}
